package com.etc.service.impl;

import com.etc.dao.AdCategoryMapper;
import com.etc.entity.AdCategory;
import com.etc.service.AdCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdCategoryServiceImpl implements AdCategoryService {
    @Autowired
    AdCategoryMapper adCategoryMapper;

    @Override
    public boolean DoDelete(long id) {
        int n = adCategoryMapper.deleteByPrimaryKey(id);
        return n>0;
    }

    @Override
    public List<AdCategory> doFind() {
        return adCategoryMapper.selectByAll();
    }
}
